<?php
namespace app\miniprogram\controller;

class UserCart extends Base {
    protected $process = ['UserCartInfo', 'tyyh\\UserCart'];

    //获取我的地址
    public function private_list() {
        $this->ajax_process(function($process, $user) {
            return $process->private_list($user);
        });
    }

    //修改购物车里购买的数量
    public function set_num() {
        $this->ajax_process(function($process, $user) {
            return $process->set_num($user);
        });
    }

    //保存地址
    public function save() {
        $this->ajax_process(function($process, $user) {
            return $process->save($user);
        });
    }

    //删除购物车
    public function del() {
        $this->ajax_process(function($process, $user) {
            return $process->delAll($user);
        });
    }

    //删除购物车里的多个
    public function del4ids() {
        $this->ajax_process(function($process, $user) {
            return $process->delAll4Ids($user);
        });
    }

    //清空购物车
    public function clear() {
        $this->ajax_process(function($process, $user) {
            return $process->clear($user);
        });
    }
}
